#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    bool canPermutePalindrome(string s)
    {
        unordered_map<char, int> unmap;
        int stand = 0;
        if (s.size() % 2 != 0) stand = 1;
        for (int i = 0;i < s.size();++i)
        {
            unmap[s[i]]++;
        }
        int count = 0;
        for (auto& a : unmap)
        {
            if (a.second % 2 != 0)
            {
                ++count;
            }
            if (count > stand)
            {
                return false;
            }
        }
        return true;
    }
};